#-*- coding=utf-8 -*-
import threading
from source.util.LogUtil import Log,log
import os
import time
from source.util.CommonUtil import getProjectDir


class CaptureThread(threading.Thread):
    def __init__(self,capture_card,capture_path,during_time):
        super(CaptureThread, self).__init__()  # 注意：一定要显式的调用父类的初始化函数。
        self.caputre_card=capture_card
        self.capture_path=capture_path
        self.during_time=during_time
        pass

    def run(self):
        cur_dir=os.getcwd()
        os.chdir(os.path.dirname(self.capture_path))
        self.caputre_card.takePictureWithtimes(self.capture_path,self.during_time)
        pass

if __name__ == '__main__':
    print os.getcwd()